Micron Document
🎖️GitЯра🎖️

Commit f28fbfa1530a6d444d5c846d5da641f8052973b9


Parents : 24806c6
Author : James Rich <2199651+jamesarich@users.noreply.github.com>
Signature : Signature validation error
Date : 2026-08-16T09:08:36Z
Committer : GitHub <noreply@github.com>
Date : 2026-08-16T09:08:36Z

fix(firmware): add fallback painter to device hardware image (#6733)

Changes
Diff

diff --git a/feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateScreen.kt b/feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateScreen.kt
index baae7aaf6d..e2277151b6 100644
--- a/feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateScreen.kt
+++ b/feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateScreen.kt
@@ -139,6 +139,7 @@ import org.meshtastic.core.resources.firmware_update_verifying
import org.meshtastic.core.resources.firmware_update_waiting_reconnect
import org.meshtastic.core.resources.i_know_what_i_m_doing
import org.meshtastic.core.resources.img_chirpy
+import org.meshtastic.core.resources.img_hw_unknown
import org.meshtastic.core.resources.learn_more
import org.meshtastic.core.resources.okay
import org.meshtastic.core.resources.save
@@ -633,11 +634,15 @@ private fun ChirpyCard() {
private fun DeviceHardwareImage(deviceHardware: DeviceHardware, modifier: Modifier = Modifier) {
val hwImg = deviceHardware.images?.getOrNull(1) ?: deviceHardware.images?.getOrNull(0) ?: "unknown.svg"
val imageUrl = "https://flasher.meshtastic.org/img/devices/$hwImg"
+ val fallbackPainter = painterResource(Res.drawable.img_hw_unknown)
AsyncImage(
model = ImageRequest.Builder(LocalPlatformContext.current).data(imageUrl).crossfade(true).build(),
contentScale = ContentScale.Fit,
contentDescription = deviceHardware.displayName,
+ placeholder = fallbackPainter,
+ error = fallbackPainter,
+ fallback = fallbackPainter,
modifier = modifier,
)
}

Served by rngit 1.5.2 - Generated in 0.08s